// pages/g/g.js
Page({

    data: {
        isClick: false,
    },
    clickMe() {
        this.setData({
            isClick: !this.data.isClick
        })
    },
    onShow() {
        this.forSanjiaoxin();
    },
    forSanjiaoxin() {
        var alt = "";
        for (let i = 1; i < 5; i++) {//控制行
            for (let j = 1; j <= 5 - i; j++) {//空白三角形
                alt += " ";
            }
            for (let k = 1; k <= 2 * i - 1; k++) {
                alt += "*";
            }
            alt += "\n";
        }
        console.log(alt);
    },
})